<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Loop extends Model
{
    
    //关联表
    protected $table = 'loops';
    //主键
    protected $primaryKey = 'id';
    //设置timesatmps为开启 
    public $timestamps = false;

    protected $fillable=['id','title','img_path','post_title','post_id'];

    public function post()
    {
        return $this->belongsTo('App\Post');
    }

}
